/*
 * vws_package.h
 *
 *  Created on: Sep 20, 2013
 *      Author: vscen
 */

#ifndef VWS_PACKAGE_H_
#define VWS_PACKAGE_H_

#include "vws_config.h"

namespace vws {
class vws_package {
public:
	void* mmc_map(char* filename, struct stat* sbP, struct timeval* nowP);
	void mmc_unmap(void* addr, struct stat* sbP, struct timeval* nowP);
	void mmc_cleanup(struct timeval* nowP);
	void mmc_destroy(void);
	void mmc_logstats(long secs);
protected:
	size_t
	httpd_read_fully(int fd, void* buf, size_t nbytes);
	size_t
	httpd_write_fully(int fd, const void* buf, size_t nbytes);
};
}

#endif /* VWS_PACKAGE_H_ */
